package qnb.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import qnb.entity.Teacher;

public interface TeacherDao {
	/**
	 * 添加一个教师信息
	 * @param teacher
	 * @return
	 */
	public int addTeacher(Teacher teacher);
	/**
	 * 根据ID查询教师信息
	 * @param teacherId
	 * @return
	 */
	public int updateTeacher( Teacher tea);
	
	/**
	 * 批量删除教师信息
	 * @param teacherId
	 * @return
	 */
	public int deleteTeacher(String[]teacherId);
	/**
	 * 查询所有教师信息或模糊查询教师信息，并进行分页展示
	 * @param teacherName
	 * @param page
	 * @param pageSize
	 * @return
	 */
	public List<Teacher> selectForPage(@Param("style")String style,@Param("name")String name,@Param("page")int page,@Param("pageSize")int pageSize);
	/**
	 * 查询所有教师信息
	 * @return
	 */
	public List<Teacher> selectAll();
	/**
	 * 根据ID查询教师信息
	 * @param teacherId
	 * @return
	 */
	public Teacher selectOne(String teacherId);
	/**
	 * 查询所有记录数
	 * @return
	 */
	public int selectCount();
	/**
	 * 检查教师账号是否重复
	 * @param account
	 * @return
	 */
	public Teacher checkAccount(String account);
	/**
	 * 根据Excel导入的数据添加到数据库
	 * @param list
	 * @return
	 */
	public int addExcelData(List<Teacher> list);
	/**
	 * 检查Excel表中是否有重复的ID
	 * @param teacherId
	 * @return
	 */
	public List<Teacher> checkExcel(List<Integer> teacherId);
	/**
	 * 检查Excel表中是否有重复的账号
	 * @param teacherAccount
	 * @return
	 */
	public List<Teacher> checkExcel2(List<String> teacherAccount);
}
